<?php


namespace App\Controller;


class SystemController extends BaseController
{
    public function version()
    {
        $description = I("description", '', 'op_t');
        $versionBuild = I("versionBuild", 0, 'intval');

        $appVersionConfig = C("APP_VERSION");
        if (strtolower($description) == "android") {
            $appVersion = $appVersionConfig['android'];
        } else {
            $appVersion = $appVersionConfig['ios'];
        }
        if (intval($appVersion['versionBuild']) == intval($versionBuild)) {
            $this->jsuccess();
        }else{
            $this->jsuccess($appVersion);
        }
    }

}